<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML >
<html>
<head>
<base href="<%=basePath%>">

<title></title>
<link rel="stylesheet" href="css/result.css" type="text/css"></link>
<link rel="stylesheet" href="css/style.css" type="text/css"></link>
<style type="text/css">
.float_left {
	list-style-type: none;
	float: left;
	width: 90px;
}

.float_left2 {
	list-style-type: none;
	float: left;
	width: 200px;
	text-align: center;
}

.clear_float {
	clear: both;
}
</style>
</head>

<body>
	<c:if test="${empty loginMap}">
		<jsp:forward page="login.jsp"></jsp:forward>
	</c:if>
	<div style="height: 70px;"></div>
	<div class="main-div">
		<div>你好！欢迎来到首页</div>
		<div style=" width:100px; float: right;margin-top: -15px">
			<a href="users/exeit">注销</a>
		</div>
		<div class="clear_float"></div>
	</div>
	<div class="main-div">
		<div style="margin-top: 30px; float: left">
			<c:if test="${loginMap.supper eq 1}">
				<div style="line-height: 30px">
					<a href="users/findAllUsers?pageIndex=1&pageSize=3">微博管理</a>
				</div>
			</c:if>
			<c:if test="${loginMap.supper eq 0}">
				<div style="line-height: 30px">
					<a>微博管理</a>
				</div>
			</c:if>
			<c:if test="${loginMap.supper eq 1}">
				<div style="line-height: 30px">
					<a href="jsp/exditAccount.jsp">账户管理</a>
				</div>
			</c:if>
			<c:if test="${loginMap.supper eq 0}">
				<div style="line-height: 30px">
					<a>账户管理</a>
				</div>
			</c:if>
		</div>
		<div style="margin-top: 30px; float: left;margin-left: 50px">
			<h4>微博首页</h4>
			<div style="margin-top: 30px;">
				<ul>
					<c:forEach items="${contentList }" var="list">
						<li class="float_left2">${loginMap.picpath }</li>
						<li class="float_left2" style="width: 100px">${list.content }</li>
						<li class="float_left2">${list.publishtime }</li>
						<li class="float_left2"><a
							href="blog/deleteMsgById?contentId=${list.id}&usersId=${loginMap.id}">删除</a>
						</li>
						<li class="clear_float"></li>
					</c:forEach>
				</ul>
			</div>
			<div style="margin-top: 30px;">
				<ul style="margin-top: 30px;">
					<li class="float_left">共${countMap.count}条记录</li>
					<li class="float_left">每页${pageSize}条</li>
					<li class="float_left">第<input type="text"
						value="${pageIndex}" style="width: 15px;" /> 页/共${totalPage}页</li>
					<li class="float_left"><a
						href="blog/findAllContent?usersId=${loginMap.id}&pageIndex=1&pageSize=${pageSize}">第一页</a>
					</li>
					<c:if test="${pageIndex eq 1}">
						<li class="float_left"><a
							href="blog/findAllContent?usersId=${loginMap.id}&pageIndex=1&pageSize=${pageSize}"
							display>上一页</a>
						</li>
					</c:if>
					<c:if test="${pageIndex ne 1}">
						<li class="float_left"><a
							href="blog/findAllContent?usersId=${loginMap.id}&pageIndex=${pageIndex-1}&pageSize=${pageSize}">上一页</a>
						</li>
					</c:if>
					<c:if test="${pageIndex ne totalPage}">
						<li class="float_left"><a
							href="blog/findAllContent?usersId=${loginMap.id}&pageIndex=${pageIndex+1}&pageSize=${pageSize}">下一页</a>
						</li>
					</c:if>
					<c:if test="${pageIndex eq totalPage}">
						<li class="float_left"><a
							href="blog/findAllContent?usersId=${loginMap.id}&pageIndex=${totalPage}&pageSize=${pageSize}"
							display>下一页</a>
						</li>
					</c:if>
					<li class="float_left"><a
						href="blog/findAllContent?usersId=${loginMap.id}&pageIndex=${totalPage}&pageSize=${pageSize}">最后一页</a>
					</li>
					<li class="float_left"><a href="#">转到第<input type="text"
							value="" style="width: 15px;" />页</a>
					</li>
					<li class="clear_float"></li>
				</ul>
			</div>
			<div style="margin-top: 30px;">
				<a href="jsp/addmsg.jsp"><input type="button" value="发表微博" />
				</a>
			</div>

		</div>
	</div>
</body>
</html>
